package com.ruoyi.archive.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.archive.mapper.SFamilyOfMartyrMapper;
import com.ruoyi.archive.domain.SFamilyOfMartyr;
import com.ruoyi.archive.service.ISFamilyOfMartyrService;

/**
 * 烈士遗属信息采集Service业务层处理
 *
 * @author Allen
 * @date 2021-09-30
 */
@Service
public class SFamilyOfMartyrServiceImpl extends ServiceImpl<SFamilyOfMartyrMapper, SFamilyOfMartyr> implements ISFamilyOfMartyrService {
    @Autowired
    private SFamilyOfMartyrMapper sFamilyOfMartyrMapper;

    /**
     * 查询烈士遗属信息采集
     *
     * @param id
     *         烈士遗属信息采集主键
     *
     * @return 烈士遗属信息采集
     */
    @Override
    public SFamilyOfMartyr selectSFamilyOfMartyrById(Long id) {
        return sFamilyOfMartyrMapper.selectSFamilyOfMartyrById(id);
    }

    /**
     * 查询烈士遗属信息采集列表
     *
     * @param sFamilyOfMartyr
     *         烈士遗属信息采集
     *
     * @return 烈士遗属信息采集
     */
    @Override
    public List<SFamilyOfMartyr> selectSFamilyOfMartyrList(SFamilyOfMartyr sFamilyOfMartyr) {
        return sFamilyOfMartyrMapper.selectSFamilyOfMartyrList(sFamilyOfMartyr);
    }

    /**
     * 新增烈士遗属信息采集
     *
     * @param sFamilyOfMartyr
     *         烈士遗属信息采集
     *
     * @return 结果
     */
    @Override
    public int insertSFamilyOfMartyr(SFamilyOfMartyr sFamilyOfMartyr) {
        if (sFamilyOfMartyr != null) {
            return sFamilyOfMartyrMapper.insertSFamilyOfMartyr(sFamilyOfMartyr);
        }
        return 0;
    }

    /**
     * 修改烈士遗属信息采集
     *
     * @param sFamilyOfMartyr
     *         烈士遗属信息采集
     *
     * @return 结果
     */
    @Override
    public int updateSFamilyOfMartyr(SFamilyOfMartyr sFamilyOfMartyr) {
        return sFamilyOfMartyrMapper.updateSFamilyOfMartyr(sFamilyOfMartyr);
    }

    /**
     * 批量删除烈士遗属信息采集
     *
     * @param ids
     *         需要删除的烈士遗属信息采集主键
     *
     * @return 结果
     */
    @Override
    public int deleteSFamilyOfMartyrByIds(Long[] ids) {
        return sFamilyOfMartyrMapper.deleteSFamilyOfMartyrByIds(ids);
    }

    /**
     * 删除烈士遗属信息采集信息
     *
     * @param id
     *         烈士遗属信息采集主键
     *
     * @return 结果
     */
    @Override
    public int deleteSFamilyOfMartyrById(Long id) {
        return sFamilyOfMartyrMapper.deleteSFamilyOfMartyrById(id);
    }
}
